﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Scap.Info
{
    public class ScapDepartmentEmployee
    {
        public int Id { get; set; }

        public string Name { get { return Deparment.Name + " - " + Employee.FullName; } }

        public int DepartmentId { get; set; } 
        [ForeignKey("DepartmentId")]
        public ScapDepartment Deparment { get; set; }

        public int EmployeeId { get; set; }
        [ForeignKey("EmployeeId")]
        public ScapEmployee Employee { get; set; }

        public int RoleId { get; set; }
        [ForeignKey("RoleId")]
        public ScapEmployeeRole Role { get; set; }

        public int EmployeeTypeId { get; set; }
        [ForeignKey("EmployeeTypeId")]
        public ScapEmployeeType EmploymentType { get; set; }

        public int EmploymentStatusId { get; set; }
        [ForeignKey("EmploymentStatusId")]
        public ScapEmployeeStatus EmploymentStatus { get; set; }             

        [Required]        
        [DataType(DataType.Date)]
        [Display(Name = "Fecha de inicio")]
        public DateTime StartDate { get; set; }

        //[Required]        
        [DataType(DataType.Date)]
        [Display(Name = "Fecha de finalización")]
        public DateTime? EndDate { get; set; }

        public bool IsEnabled { get; set; }
            
        public string Comments { get; set; }
    }
}
